package cn.edu.cqytxy.entity;

/**
 * 枪
 *
 * @author yinjw
 */
public class Gun extends Weapon {

    /**
     * 装弹数量
     */
    private int num;

    public Gun() {

    }

    public Gun(int num, int att, String name) {
        super(att, name);
        this.num = num;
//        super.setAtt(att);
//        super.setName(name);
    }

    public int getNum() {
        return num;
    }

    public void setNum(int num) {
        this.num = num;
    }

    /**
     * 攻击
     */
    @Override
    public void attack() {
        System.out.println("名称为：" + super.getName() + "的,装弹数量为："+this.num + "发的突击抢发起攻击");
    }
}
